package com.rongxue.mapper;

import com.rongxue.pojo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface SUserMapper {
    int countByExample(SUserExample example);

    int deleteByExample(SUserExample example);

    int deleteByPrimaryKey(Long id);

    int insert(SUser record);

    int insertSelective(SUser record);

    List<SUser> selectByExample(SUserExample example);

    SUser selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") SUser record, @Param("example") SUserExample example);

    int updateByExample(@Param("record") SUser record, @Param("example") SUserExample example);

    int updateByPrimaryKeySelective(SUser record);

    int updateByPrimaryKey(SUser record);
    //用户实名认证
    int updateRealInfo(SUser record);

    List<SUser> selectIDCardNoByIDCardNo(String card_no);

    SUser selectUserIdByIdAndCardNo(String card_no);

    SUser selectUserIdById(long id);

    SUser selectUserInfoById(long id);

    SUser selectUserInfoByOutSerialNo(String out_serial_no);

    int updateLeveById(SUser SUser);
    //查询用户
    SUser selectUserByMap(Map<String,Object> map);
    //用户红包
    List<Rewards> selectRedpacketByUserId(String userId);
    //修改过期红包状态
    void  updateRedpacketByUserId(String userId);
    //用户加息券
    List<Rewards> selectInterestcouponByUserId(String userId);
    //修改过期加息券状态
    void updateInterestcouponByUserId(String userId);
    //用户现金券
    List<Rewards> selectCashcouponByUserId(String userId);
    //修改过期现金券状态
    void updateCashcouponByUserId(String userId);
    //跟新积分和融雪币
    void updateIntegralAndRxgoldByMap(Map<String,Object> map);
    //邀请人列表
    List<SUser> selectInviteListByUserId(Integer userId);
    //奖品列表
    List<LotteRule> selectLotteRuleAll();
    //查询奖品
    LotteRule selectLotteRuleById(Integer id);
    //累计注册人数
    Integer selectTotalPeople();
    //渠道id
    Integer selectChannelId(String channel);
    //下载地址
    String selectChannelUrl(String channel);
}